<?php

include('header.php');
$smarty->assign('media', siteinfo('media'));
include('bottom_banners.php');
include('chat.php');
include('sidebar_banners.php');

$current_clan = mres(($_GET['clan_id']));

$clanInfo = getClanInfo($current_clan);

$smarty->assign('clanInfo', $clanInfo);

$TotalPublishedPhotos = getTotalPublishedPhotos($current_clan);
$paginatorPublishedPhotos = new Paginator;
$paginatorPublishedPhotos->items_total = $TotalPublishedPhotos;
$paginatorPublishedPhotos->mid_range = 5;
$paginatorPublishedPhotos->paginate();

$TotalCommentedPhotos = getTotalCommentedPhotos($current_clan);
$paginatorCommentedPhotos = new Paginator;
$paginatorCommentedPhotos->items_total = $TotalCommentedPhotos;
$paginatorCommentedPhotos->mid_range = 5;
$paginatorCommentedPhotos->paginate();


$PublishedPhotos = getPublishedPhotos ($current_clan, $paginatorPublishedPhotos->limit);
$LastCommentedPhotos = getLastCommentedPhotos ($current_clan, $paginatorCommentedPhotos->limit);
$PopularPhotos = getPopularPhotos ($current_clan, $paginatorPublishedPhotos->limit);
$smarty->assign('paginatorPublishedPhotos', $paginatorPublishedPhotos->display_pages());
$smarty->assign('paginatorCommentedPhotos', $paginatorCommentedPhotos->display_pages());

$smarty->assign('PublishedPhotos', $PublishedPhotos);
$smarty->assign('LastCommentedPhotos', $LastCommentedPhotos);
$smarty->assign('PopularPhotos', $PopularPhotos);


$smarty->assign('clanInfo', $clanInfo);



$smarty->display('profil.tpl');
include('footer.php');


/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
?>
